# create_myroms_favorites.sh

Create a clean `_MyRoms` folder that contains only the arcade games you actually own on your MiSTer FPGA.

================================================================================
English
================================================================================

### What this script does

- Scans your MAME / HBMAME ROM zip files
- Finds matching `.mra` files (including those inside `_alternatives`)
- Creates the folder `/_Arcade/_MyRoms`
- Places **symlinks** to only the matching MRA files

When you open the `_MyRoms` folder in the Arcade menu, you will see only the games you own.

### Features

- Safe to re-run at any time
- Automatically refreshes the list when you add or remove ROMs
- Shows progress and elapsed time while scanning
- Does **not** delete any cores or original MRA files

### Requirements

- MiSTer FPGA
- ROM zip files placed in one of these folders:
  - `/games/mame`
  - `/games/hbmame`
  - `/_Arcade/mame`
- Arcade MRA files already installed (usually via Update_All)

### How to use

1. Copy `create_myroms_favorites.sh` to `/media/fat/Scripts/`
2. Give execute permission:

   chmod +x /media/fat/Scripts/create_myroms_favorites.sh

3. Run the script:

   /media/fat/Scripts/create_myroms_favorites.sh

   or from the MiSTer Scripts menu.

4. After it finishes, open the Arcade menu → `_MyRoms`

### Re-running the script

You can run the script again whenever you want.
It will delete the old `_MyRoms` folder and recreate it with the current list of owned ROMs.

### Notes

- The number of matched games is usually lower than the number of ROM files you own.
  This is normal — not every MAME set has a MiSTer core yet.
- Name collisions (same filename from main and alternatives) are automatically skipped.

### License

Public Domain / CC0.
Free to use, modify, and redistribute.